﻿
using System.Windows;
using System.Windows.Controls;

namespace XAudio2Controls
{
    /// <summary>
    /// Base class for custom controls that will build themselves by
    /// calling FindName("PART_a_control") with the ResourceRoot property.
    /// </summary>
    public class CustomControlBase : Control
    {
        protected enum PatchSource
        { 
            FromFilePath,
            FromStream, 
            FromOscillator,
        }

        public FrameworkElement ResourceRoot
        {
            get 
            { 
                return GetTemplateChild("LayoutRoot") as FrameworkElement; 
            }
        }
        

        internal virtual void GetTemplateChildren() { }
        protected override void OnInitialized(System.EventArgs e)
        {
            base.OnInitialized(e);
        }
    }
}
